class student:
    num = ''
    name = ''
    age = 0
    sex = ''
    height = 0
    weight = 0
    grade = 0
    address = ''
    phone_num = ''

    def learn(self, time):
        print('学习了', time, '分钟。')

    def play_game(self, game_name):
        print('在玩', game_name, '。')

    def programming(self, nrows):
        print('写了', nrows, '行代码。')

    def get_sum(self, *args):
        total_sum = 0
        for i in args[0]:
            total_sum += i
        return total_sum


s1 = student()
s1.learn(1)
s1.play_game('王者荣耀')
s1.programming(8)
print(s1.get_sum([1, 2, 3, 4, 5]))


class Car:
    type = ''
    wheels_num = 0
    color = ''
    weight = 0
    tank_size = 0

    def run(self, function):
        print('这是一辆', function, '，正在跑。')


car1 = Car()
car1.run('法拉利')
car2 = Car()
car2.run('宝马')
car3 = Car()
car3.run('铃木')
car4 = Car()
car4.run('五菱')
car5 = Car()
car5.run('拖拉机')


class LapTop:
    model = ''
    standby_time = 0
    color = ''
    weight = 0
    cpu_model = ''
    memory_size = 0
    disk_size = 0

    def play_game(self, game_name):
        print('可以玩', game_name, '。')

    def work(self):
        print('可以用于办公。')


la1 = LapTop()
la1.play_game('王者荣耀')
la1.work()


class monkey:
    type = ''
    sex = ''
    color = ''
    weight = 0

    def fire(self, fire_material):
        print('使用', fire_material, '生火。')

    def learn(self, *args):
        for i in args[0]:
            print('可以学习', i, '；')


m1 = monkey()
m1.fire('木棍')
m1.learn(['生火', '游泳', '跳高'])
